package com.sunny.myproject.produce.entity;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.sunny.myproject.storem.entity.Materiel;
import com.sunny.myproject.system.entity.IdEntity;

@Entity
@Table(name="tb_mrp_sub")
public class Mrp_sub extends IdEntity{
	
	private Materiel materiel;

	private Mrp mrp;
	
	/**
	 * 编号
	 */
	private String code;
	/**
	 * 类型
	 */
	private String type;
	/**
	 * 用料
	 */
	private double use_materiel;
	/**
	 * 损耗
	 */
	private double loss;
	/**
	 * 数量
	 */
	private double amount;
	/**
	 * 委外
	 */
	private String outsourcing;
	/**
	 * 备注
	 */
	private String remark;
	
	@OneToOne(targetEntity=Materiel.class)
	public Materiel getMateriel() {
		return materiel;
	}
	public void setMateriel(Materiel materiel) {
		this.materiel = materiel;
	}
	
	@ManyToOne(targetEntity=Mrp.class)
	public Mrp getMrp() {
		return mrp;
	}
	public void setMrp(Mrp mrp) {
		this.mrp = mrp;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public double getUse_materiel() {
		return use_materiel;
	}
	public void setUse_materiel(double use_materiel) {
		this.use_materiel = use_materiel;
	}
	public double getLoss() {
		return loss;
	}
	public void setLoss(double loss) {
		this.loss = loss;
	}
	public double getAmount() {
		return amount;
	}
	public void setAmount(double amount) {
		this.amount = amount;
	}
	public String getOutsourcing() {
		return outsourcing;
	}
	public void setOutsourcing(String outsourcing) {
		this.outsourcing = outsourcing;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	
	
}
